package com.e3.basdoc.warehouse.client;

import java.util.List;

import com.e3.basdoc.warehouse.model.WarehouseModel;
import com.e3.basdoc.warehouse.model.WarehouseQC;
import com.e3.web.core.client.RPCServiceHelper;
import com.e3.web.core.client.WebException;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;

public interface WarehouseRPCService extends RemoteService {
	public static class Util {

		private static WarehouseRPCServiceAsync instance;

		public static WarehouseRPCServiceAsync getInstance() {
			instance = (WarehouseRPCServiceAsync) RPCServiceHelper.getService(WarehouseRPCService.class.getName());
			if (instance == null) {
				instance = GWT.create(WarehouseRPCService.class);
				RPCServiceHelper.registerServiceEntryPoint(instance);
			}
			return instance;
		}
	}
	
	public WarehouseModel newWarehouse(WarehouseModel model) throws WebException;
	
	public WarehouseModel modifyWarehouse(WarehouseModel model) throws WebException;
	
	public List<WarehouseModel> getWarehouseByCondition(WarehouseQC qc) throws WebException;
	
	public void deleteWarehouses(List<WarehouseModel> models) throws WebException;

}
